max/min functions return local variables, array with optional null must be empty-arrays