!empty($hasLocationTypes[$key]) is more readable, more concise and executes faster. I recommend only using CRM_Utils_Array::value when you actually care about the value.