add defines for checking state validity