<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isSignatureValid(expected, received):
 """ Verifies that the received signature matches the expected value """

    if expected:
        if not received or expected != received:
            return False
    else:
        if received:
            return False
    return True