I prefer breaking out schema, it doesn't violate Law of Demeter, https://en.wikipedia.org/wiki/Law_of_Demeter#In_object-oriented_programming, could write as

```python
scheme = context.dataset.schema if context.dataset else None
if schema and schema.is_date_simpletype(self.value): 
```

which is better, but still violating, a future refactor might fix this by removing the context notion (for another branch).