Add NULL check in SamplerBank and fix getSampler call.