Added null check for new public API.
OCD