Reverted to using instanceOf, rather than huge reflective method