Check for variable keys before depending on them