TIMOB-12027-Incorporated the review comments-width null check and using nativeView