crash check

add the parameter checking to avoid crash when call the constructor of ParticleSystem