Fix getPathById for Oracle

Added extra code to handle the case of Oracle which saves empty strings
as null values.