BUG Fixed treatment of 'only' conditional when an array value is given

Previously if the $only was an array it would fail the `$only != $class` conditon (since string !== array). This fix ensures the comparison type is checked correctly prior to the test.