Error message for wrong type definition added.