Only validate dataSource when defined (Fixes #482)