adding the ability to handle getBytes which returns null as an empty array