Add null check for dynamicPls