Adding param method to error target method and avoiding null.