Defaulting resourceInstanceId to -1 when passed as null