You can write `if parsed_url.userinfo.present?`.