make the getType() a bit better.
fixes NPE in scheduler.