Add exception handling and coerce_value tests