Added extra error handling for inline convert