Restrict type() to a single argument to prevent dynamic class creation