Adds guard clauses to Hamming difference
Oops, empty strings are valid