fix($resource): null default param results in TypeError

Fixes issue when setting a default param as `null` error
`TypeError: Cannot read property 'charAt' of null`