Bit more efficient, letting the exception be thrown is a bit slow