Fix: mkclass crashes when called without arguments

fixes #7617