Return Buffer if encoding is undefined