fix an error when getContents returned an array whith null values