If you want transform to be non-NULL, you should consider using a reference instead. (Maybe even a const one in case this doesn't change the parameter).