Return nil if call returns javascript undefined