Check some vars before using them