Using checked exceptions for control flow is slow. Lets replace it with ...

...an isEmpty check.

@tomylobo