Some safety checks for variables.