Fixed check for Timespand edm:end generating NPE