- copied checkState method from guava and removed guava from dependencies, because 3 lines of code don't rectify a 2mb dependency