add attr if value is a function