Validator.php: add return statement in hostname function. Refs #1903