I've done this before and yes, they are fine but, given that ammonia can trigger algae, why not wait until the tank is cycled? You'll typically need to do a large water change at the end of a fishless cycle to get the nitrate level down and that's a good time to add the plants.