Cleaned up if statement.