def check_port(port):
    """ Check if a port is valid. Return an error message indicating what is invalid if something isn't valid. """
    if isinstance(port, int):
        if port not in range(0, 65535):
            return 'Source port must in range from 0 to 65535'
    else:
        return 'Source port must be an integer'
    return None