Yes, it is perfectly fine to use laptops while charging. Modern laptops have smart electronics which stop the incoming power supply even if the laptop is plugged in.