avoid double check `!isBuffer`