tidy state type checks