fixed error in if statemement for graceful fail on picamera