added error handling for invalid doi