Removed some calls to 'is_nil'
Bugfix for memory overflow