Use boolean variable to check for existence of cv2