def get_fileobject(title, objtype):
    """
    Returns the id of the object if it exists, otherwise returns
    False.

    Arguments:
    title -- The filename to be queried.
    objtype -- Image, Document from Wagtail.

    Returns:
    False if the object does not exist in this environment,
    object's integer ID if it does exist.
    """

    try:
        # Check whether the object already exists.
        localobj = objtype.objects.get(file=title)

        if localobj:
            return localobj.id

    except objtype.DoesNotExist:
        return False

    return False