check arguments so null is not required.