Yes. It is legal. I-140 (NIW) was approved already. To clarify, you have to tell BCIS whether or not you have applied for EAD previously.