added isBuffer client-side for portability