You need to check the type of `context -> var -> value` before you cast it