You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: blvalue.m
    path of file: ./repos/erplab/functions
    
    the code of the file until where you have to start completion: % PURPOSE: Gets the base line mean value from channel "chan", bin "bin", and window (for baseline) "blcorr"
%
%
% FORMAT:
%
% blv = blvalue(ERP, chan, bin, blcorr)
%
% INPUT:
%
% ERP        - input ERPs
    
function is part of ERPLAB Toolbox ***
% Author: Javier Lopez-Calderon
% Center for Mind and Brain
% University of California, Davis,
% Davis, CA
% 2009

function blv = blvalue(ERP, chan, bin, blcorr)

%
% Baseline assessment
%
datatype = checkdatatype(ERP);
if strcmpi(datatype, 'ERP')
    kktime = 1000;
else
    kktime = 1;
end