I've removed this as it was not needed. Applications are now looked up by ID so the ID cannot possibly be null.