Is it allowed to pass ptr as null?