Better check of variables