Added error checking tests for async methods
Use types for pattern checking