Removed useless imports
changed is instanceof to isEmpty expression
Removed casts