President Trump took some credit in a tweet that said 2017 was the safest year on record for commercial aviation.