Workaround for bug with JGoodies Plastic theme that causes app to crash at the start.
Added validation