is get_class(null) ok? otherwise we should do a check is_null($block) ? 'null' : get_class($block)