Defining checkSlowAndSet.