Converted double bang !! to != nil for more clarity