refactor the se checks into macros