ensure callback first arg is err or null