All these checks should be able to be done as `if (!($typesTable instanceof JTableContenttype))`