Check for null pointer exception
Change to boolean success true
Update to error handling in anon code