Changed some "assert(ptr); *ptr" to "*NONULL(ptr)"