fix npe
oh, the "special case" #1138 can actually be safely generalized!