Why not using Preconditions here? It's a perfect use-case.