Replaces deprecated assertType() in test