Add user pointer check function