allow for null linkValue

`typeof null` is 'object', so this line causes an error if linkValue is null.