handle case where message, file or funtion is nil