Suggest error handling and conditional improvement