adding assert in middleClass.lua when constructor is incorrectly called