optimized len check for smartBuf object