>Suppose someone is laid-off, H1B should be invalid at that time.
>I just wonder in this situation, whether I485 will still be valid.
The I-485 is still valid and status is legal because your EB category: NIW is self-petitioned. You just lose the non-immigrant status. However, the basis of your I-485 is the I-140 in which you have promised to work in certain field to benefit US interests. So I-485 can be denied if you don't work or cannot find work in that field.