Change test to check for the actual object rather than type