Refactoring of checkStatus, checkNotStatus functions.