remove duplicate check in isBuffer