The isValidURL function was returning false when the provided value was undefined/null/empty, but
needs to return true instead so it doesn't interfere with Yup validation.
Replaced regex-based URL validation with the native JavaScript URL constructor to improve
reliability. This approach should be more robust and should help prevent bugs like the one we
previously encountered with malformed regex.
fix#1539