throw errors on null arguments