Added a check so we don't have PHP notices