Maybe this is_port() call was intended to be on check above :)