Replaces expensive Exception handling