console.log null on else