Changed 'undefined' to NSNull null as value of peripheral.name when nil.