fixing functiuon Buffer to trycatch/isBuffer mock