guard against null parameters