Changed way to check empty values
pre_function with null value