Allow mapping to have an empty string as source

addMapping was checking source for truthiness instead of just null /
undefined. Everywhere else just checks for null / undefined which could
lead to an error.