an empty string should not return false, javascript