Make the resource as object be optional.