runtime/class.m: Better handling of Nil parameters

This matches the behaviour of the Apple runtime.