oracle function return
CREATE OR REPLACE FUNCTION to_date_check_null(dateString IN VARCHAR2,
dateFormat IN VARCHAR2) RETURN DATE IS
BEGIN
IF dateString IS NULL THEN
return NULL;
ELSE
return to_date(dateString, dateFormat);
END IF;
END;