Added check for NSNull