Make sure both strings length is greater than 0, then check