def _verify_argument_is_older_than_owner(owner_identifier, arg_identifier):
    """
    A helper function to catch an Exception early, so it doesn't get caught by the server where the error message is less clear.
    """
    if (arg_identifier.preliminary is not None and owner_identifier.
        preliminary is not None):
        if arg_identifier.preliminary == owner_identifier.preliminary:
            if arg_identifier.id >= owner_identifier.id:
                raise ValueError(
                    'An object used as an argument must be created before the object it belongs to.'
                    )
