Sql Check Empty String Python Functions