improved metrics: no protected vars
changed NPE for IllegalArgumentException