Frameworks/base: Check before foreach in Script

According to the if below, ains == null is potentially valid. But
the foreach loop would throw a NullPointerException.

Change-Id: I4460fb1357eaa3abfe0ab9a21effb608f474ab51
1 file changed