You might want to follow the `result_hash` assignment a couple lines up with `.delete_if { |k, v| v.nil? }` to preserve the check for `value` not being nil.