Add a check for null.