Helper methods for easy error handling.