Check for hasattr

Took the idea from: https://buildoutcoredev.readthedocs.org/en/latest/style.html#concrete-rules