Handle nil values in secure_compare util