defensive checks