Merge pull request #240 from arjantijms/fix_npe

Fix NPE when params is null