return nil instead of exception

The overhead with exception handling was causing performance issues