$array = array( '1' => true, '2' => '1', '3' => false, '4' => '0', '5' => null )
return $array[$key] ? true : false;
But in XenForo, it doesn't work the same way. Instead the program will come to a screeching halt and loudly fail with an error about non-existent indexes. Because of this, it forces me to include extra checks for pretty much EVERY instance I use an array...
return isset($array[$key]) && $array[$key] ? true : false;