Improve completers generation

May want to ensure that the input meets the expected format. e.g. `Preconditions.checkArgument(input != null && input.matches(..))`