Write a function in Python to check whether a given string is in lower case or not.
String: ThisIsAnExample
def is_lowercase(string):
    for character in string:
        if character != character.lower():
            return False
    return True