Rather than this long (but very explicit) OR statement, perhaps:

    if ( !$value or in_array(strtolower($value), array('f', 'false', 'n', 'no', 'off')) )