Fix crashing when copying layers with null strings as parameters.

Luckily, previously layers would not have a null string value
 - but this can now happen with the recent GPX Metadata parameters code.