I think this check and the one below on hostname aren't necessary since they'll be validated by the underlying call to check(), and any errors from check are propagated as-is.