TIMOB-12452 add checking for LayoutParams

add checking for LayoutParams
https://jira.appcelerator.org/browse/TIMOB-12452