Added a null check.