Revert "changes done for nil class"

This reverts commit 4e7fd21deba80aefb2c7b2cea120609e301eb614.